package org.adorsys.aderp.catal.domain;

import java.math.BigDecimal;
import javax.persistence.Column;
import javax.persistence.ManyToOne;
import javax.validation.constraints.NotNull;
import org.springframework.roo.addon.javabean.RooJavaBean;
import org.springframework.roo.addon.jpa.entity.RooJpaEntity;
import org.springframework.roo.addon.tostring.RooToString;

@RooJavaBean
@RooToString
@RooJpaEntity
public class Discount {

    @NotNull
    @Column(name = "discountKeyBk", unique = true)
    private String discountKey;

    @NotNull
    @ManyToOne
    private DiscountType discountType;

    private String title;

    private BigDecimal rate;

    private BigDecimal minQuantity;

    private BigDecimal maxQuantity;

    @ManyToOne
    private Unit unit;
}
